The Dreamweaver JavaScript API > String manipulation functions > dreamweaver.scanSourceString()

 

dreamweaver.scanSourceString()

Availability

Dreamweaver UltraDev 1.0

Description

Scans a string of HTML and finds the tags, attributes, directives, and text. For each tag, attribute, directive, and text span found, scanSourceString() invokes a callback function supplied by the caller. Dreamweaver supports the following callback functions: openTagBegin(), openTagEnd(), closeTagBegin(), closeTagEnd(), directive(), attribute(), and text().

Arguments

HTMLstr, parserCallbackObj

HTMLstr is a string containing HTML code.
parserCallbackObj is a JavaScript object that has one or more of the following methods: openTagBegin(), openTagEnd(), closeTagBegin(), closeTagEnd(), directive(), attribute(), and text(). For best performance, parserCallbackObj should be a shared library defined using the C-Level Extensibility interface. Performance is also improved if parserCallbackObj defines only the callback functions that it needs.

Returns

A Boolean value indicating whether or not the operation completed successfully.